package com.app.miwawa.api.system.entity.view;

import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.framework.common.api.entity.CommonEntityUUID;
import org.framework.common.api.support.annotation.Search;
import org.framework.common.api.support.constant.SystemConstants;
import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 环信账号
 * <p>描述: </p>
 * <p>Company: Professional</p>
 * @author chanlong(陈龙)
 * @date 2016年5月17日 下午1:28:52
 * @version 1.0.2016
 */
@Entity @Table(name = "VB_EASEMOB")
public class EasemobView extends CommonEntityUUID {
	
	/** serialVersionUID(long):. */
	private static final long serialVersionUID = 3498737776502411941L;

	// 用户ID
	private String uid;

	// 环信ID
	private String eid;

	// 用户类型
	private String type;

	// 用户手机
	@Search
	private String mobile;

	// 所在机构
	@Search
	private String shops;
	
	// 所在机构ID
	private String shopsid;
	
	// 创建时间（注册时间）
	@Temporal(TemporalType.TIMESTAMP)
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	private Date createDate;

	public EasemobView() {
		
	}
	
	public EasemobView(String uid, String eid, String type, String mobile, String shops) {
		this.uid = uid;
		this.eid = eid;
		this.type = type;
		this.shops = shops;
		this.mobile = mobile;
		this.createDate = new Date();
		this.status = SystemConstants.DICT_STATUS_DEFAULT;
		this.invalid = SystemConstants.DICT_DELETE_INVALID;
	}
	
	public String getUid() {
		return uid;
	}

	public void setUid(String uid) {
		this.uid = uid;
	}

	public String getEid() {
		return eid;
	}

	public void setEid(String eid) {
		this.eid = eid;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getShops() {
		return shops;
	}

	public void setShops(String shops) {
		this.shops = shops;
	}

	public String getShopsid() {
		return shopsid;
	}

	public void setShopsid(String shopsid) {
		this.shopsid = shopsid;
	}

	public Date getCreateDate() {
		return createDate;
	}

	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
}
